<?php

namespace adibilis\adminBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Article
 *
 * @ORM\Table("article")
 * @ORM\Entity(repositoryClass="adibilis\adminBundle\Entity\ArticleRepository")
 */
class Article
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="date", type="datetime")
     */
    private $date;

    /**
     * @var string
     *
     * @ORM\Column(name="title", type="string", length=255)
     */
    private $title;

    /**
    * @ORM\ManyToOne(targetEntity="adibilis\UserBundle\Entity\User")
    * @ORM\JoinColumn(nullable=false)
    */
    private $author;

    /**
     * @var string
     *
     * @ORM\Column(name="content", type="text")
     */
    private $content;


    /**
     * @ORM\OneToOne(targetEntity="adibilis\adminBundle\Entity\ArticleImage", cascade={"persist"})
     * @ORM\JoinColumn(nullable=true)
     */
    private $image;

    /**
     * @ORM\OneToMany(targetEntity="adibilis\adminBundle\Entity\NewsComment", mappedBy="article", cascade={"remove"})
     * @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
    */
    private $comments;






    /**
     * @var string
     *
     * @ORM\Column(name="titleen", type="string", length=255)
     */
    private $titleen;


    /**
     * @var string
     *
     * @ORM\Column(name="titlede", type="string", length=255)
     */
    private $titlede;





    /**
     * @var string
     *
     * @ORM\Column(name="contenten", type="text")
     */
    private $contenten;


    /**
     * @var string
     *
     * @ORM\Column(name="contentde", type="text")
     */
    private $contentde;




    public function __construct()
      {
        $this->date = new \Datetime();
      }

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set date
     *
     * @param \DateTime $date
     * @return Article
     */
    public function setDate($date)
    {
        $this->date = $date;
    
        return $this;
    }

    /**
     * Get date
     *
     * @return \DateTime 
     */
    public function getDate()
    {
        return $this->date;
    }

    /**
     * Set title
     *
     * @param string $title
     * @return Article
     */
    public function setTitle($title)
    {
        $this->title = $title;
    
        return $this;
    }

    /**
     * Get title
     *
     * @return string 
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Set author
     *
     * @param string $author
     * @return Article
     */
    public function setAuthor($author)
    {
        $this->author = $author;
    
        return $this;
    }

    /**
     * Get author
     *
     * @return string 
     */
    public function getAuthor()
    {
        return $this->author;
    }

    /**
     * Set content
     *
     * @param string $content
     * @return Article
     */
    public function setContent($content)
    {
        $this->content = $content;
    
        return $this;
    }

    /**
     * Get content
     *
     * @return string 
     */
    public function getContent()
    {
        return $this->content;
    }

    /**
     * Set image
     *
     * @param \adibilis\adminBundle\Entity\ArticleImage $image
     * @return Article
     */
    public function setImage(\adibilis\adminBundle\Entity\ArticleImage $image = null)
    {
        $this->image = $image;
    
        return $this;
    }

    /**
     * Get image
     *
     * @return \adibilis\adminBundle\Entity\ArticleImage 
     */
    public function getImage()
    {
        return $this->image;
    }

    /**
     * Set titleen
     *
     * @param string $titleen
     * @return Article
     */
    public function setTitleen($titleen)
    {
        $this->titleen = $titleen;
    
        return $this;
    }

    /**
     * Get titleen
     *
     * @return string 
     */
    public function getTitleen()
    {
        return $this->titleen;
    }

    /**
     * Set titlede
     *
     * @param string $titlede
     * @return Article
     */
    public function setTitlede($titlede)
    {
        $this->titlede = $titlede;
    
        return $this;
    }

    /**
     * Get titlede
     *
     * @return string 
     */
    public function getTitlede()
    {
        return $this->titlede;
    }

    /**
     * Set contenten
     *
     * @param string $contenten
     * @return Article
     */
    public function setContenten($contenten)
    {
        $this->contenten = $contenten;
    
        return $this;
    }

    /**
     * Get contenten
     *
     * @return string 
     */
    public function getContenten()
    {
        return $this->contenten;
    }

    /**
     * Set contentde
     *
     * @param string $contentde
     * @return Article
     */
    public function setContentde($contentde)
    {
        $this->contentde = $contentde;
    
        return $this;
    }

    /**
     * Get contentde
     *
     * @return string 
     */
    public function getContentde()
    {
        return $this->contentde;
    }

    /**
     * Add comments
     *
     * @param \adibilis\adminBundle\Entity\NewsComment $comments
     * @return Article
     */
    public function addComment(\adibilis\adminBundle\Entity\NewsComment $comments)
    {
        $this->comments[] = $comments;
    
        return $this;
    }

    /**
     * Remove comments
     *
     * @param \adibilis\adminBundle\Entity\NewsComment $comments
     */
    public function removeComment(\adibilis\adminBundle\Entity\NewsComment $comments)
    {
        $this->comments->removeElement($comments);
    }

    /**
     * Get comments
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getComments()
    {
        return $this->comments;
    }
}